package com.ctl.utils.swing;

/**
 * <p>Title: Points</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2019</p>
 * <p>Company: www.ctl.com</p>
 *
 * @author ctl
 * @version 1.1
 * @date 2022-12-23 15:22
 */
public class Points {
    private int[] x;
    private int[] y;
    private int length;

    public int[] getX() {
        return x;
    }

    public void setX(int[] x) {
        this.x = x;
    }

    public int[] getY() {
        return y;
    }

    public void setY(int[] y) {
        this.y = y;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
        this.x=new int[this.length];
        this.y=new int[this.length];
    }

    public Points withX(int[] x) {
        this.x = x;
        return this;
    }

    public Points withY(int[] y) {
        this.y = y;
        return this;
    }

    public Points withLength(int length) {
        this.length = length;
        this.x=new int[this.length];
        this.y=new int[this.length];
        return this;
    }
}
